<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.shsh.safemanage.model.PostCheck"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.util.Util"%>
<%@page import="com.shsh.safemanage.util.Constants"%>
<%
{	
	Integer theYear = 0;
	Integer theMonth = 0;

	try{
		theYear = Integer.parseInt(request.getParameter(Constants.REQUEST_PARAMETER_YEAR));
	}catch(Exception e){
		
	}
	
	try{
		theMonth = Integer.parseInt(request.getParameter(Constants.REQUEST_PARAMETER_MONTH));
	}catch(Exception e){
		
	}
	
	int yearStart = 2000;
	int yearEnd = 2050;	
	int monthEnd = 12;
	
	int[] current = Util.getCurrentDate();
	
	yearEnd = current[0];
	
	if( theYear == yearEnd) {
		monthEnd = current[1];
	}
	
%>
选择年月：
<select id="year" onchange="selectYear()">
	<%for (int y = yearStart; y<=yearEnd; y++){ %>
	<option value="<%=y %>" <%=y==theYear?"selected":""%>><%=y %></option>
	<%} %>
</select>年
<select id="month" onchange="selectMonth()">
	<%for (int m = 1; m<=monthEnd; m++){ %>
	<option value="<%=m %>" <%=m==theMonth?"selected":""%>><%=m %></option>
	<%} %>
</select>月

<%
}
%>